USE [Tibet]
GO
/****** Object:  StoredProcedure [dbo].[SELMetricaDePerfil]    Script Date: 06/23/2011 19:07:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
CREATE PROCEDURE [dbo].[SELMetricaDePerfilMetrica]
	-- Add the parameters for the stored procedure here
	@IdPerfilMetrica int = 0
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	
	SELECT 
		[Tibet].[dbo].[Metrica].[idMetrica],
		[Tibet].[dbo].[Metrica].[NombreMetrica],
		[Tibet].[dbo].[Metrica].[Descripcion]
	FROM 
		[Tibet].[dbo].[Metrica], 
		[Tibet].[dbo].[Perfil_Metrica_Metrica]
	WHERE 
		[idMetrica] = [Tibet].[dbo].[Perfil_Metrica_Metrica].[Fk_Metrica_idMetrica] AND 
		[Tibet].[dbo].[Perfil_Metrica_Metrica].[Fk_Perfil_Metrica_idPerfil_Metrica] =  @IdPerfilMetrica;
	
	
END

